package com.hmtech.ayp.common.exception;

import com.hmtech.ayp.common.resp.IResultCode;

import java.lang.reflect.Executable;

public class BusinessException extends RuntimeException {
    protected Integer code;

    public BusinessException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public BusinessException(IResultCode resultCode, Throwable t) {
        super(resultCode.getMessage(), t);
        this.code = resultCode.getCode();
    }
}
